<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/tablibs.jsp"%>
<html>
<head>
<title>${title}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="${ctx }/public/bootstrap/css/bootstrap.min.css"
	rel="stylesheet">
<link href="${ctx }/public/font-awesome/css/font-awesome.min.css"
	rel="stylesheet">
<link href="${ctx }/public/nprogress/nprogress.css" rel="stylesheet">
<link href="${ctx }/public/iCheck/skins/flat/green.css" rel="stylesheet">
<link
	href="${ctx }/public/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css"
	rel="stylesheet">
<link href="${ctx }/public/jqvmap/jqvmap.min.css" rel="stylesheet" />
<link
	href="${ctx }/public/bootstrap-daterangepicker/daterangepicker.css"
	rel="stylesheet">
<link href="${ctx }/public/mjolnic-bootstrap-colorpicker/dist/css/bootstrap-colorpicker.min.css" rel="stylesheet">
<link href="${ctx }/public/cropper/dist/cropper.min.css" rel="stylesheet">
<!-- NProgress -->

    <link href="${ctx }/public/nprogress/nprogress.css" rel="stylesheet">
<link href="${ctx }/public/css/custom.min.css" rel="stylesheet">
<link href="${ctx }/public/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet">

<!-- jQuery -->
<script src="${ctx }/public/js/jquery.min.js"></script>
</head>
<body class="nav-md">
	<div class="container body">
		<div class="main_container">
			<jsp:include page="/common/header.jsp"></jsp:include>
			<!-- page content -->
			<div class="right_col" role="main">
				<!-- top tiles -->
				<div class="page-title">
					<div class="title_left">
		                <h3>消息编辑</h3>
		            </div>
		            
				</div>
				<div class="row">
					<div class="col-md-12 col-sm-12 col-xs-12">
					
                <div class="x_panel">
                  <div class="x_content">
                    <br>
                    <form id="form1" action="${ctx}/teacher/news/save" method="post" data-parsley-validate="" class="form-horizontal form-label-left" >
						<input type="hidden" name="news.id" value="${obj.news.id }"/>
                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">标题： <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <input id="title"  type="text" name="news.title" value="${obj.news.title}" required="required" class="form-control col-md-7 col-xs-12">
                        </div>
                      </div>
                      <div class="form-group">
                        <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">内容： <span class="required">*</span>
                        </label>
                        <div class="col-md-6 col-sm-6 col-xs-12">
                          <textarea id="content" name="news.content" rows="3" cols="4" required="required" class="form-control col-md-7 col-xs-12">${obj.news.content}</textarea>  
                        </div>
                      </div>
                      <div class="ln_solid"></div>
                      <div class="form-group">
                        <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                          <button class="btn btn-primary" type="button" onclick="window.history.back();">取消</button>
                          <button type="button" class="btn btn-success" onclick="save()">保存</button>
                        </div>
                      </div>

                    </form>
                  </div>
                </div>
              </div>
				</div>
			</div>
		</div>
		
		<jsp:include page="/common/footer.jsp"></jsp:include>
		
	</div>

</body>
<!-- Bootstrap -->
<script src="${ctx }/public/bootstrap/js/bootstrap.min.js"></script>
<!-- FastClick -->
<script src="${ctx }/public/fastclick/lib/fastclick.js"></script>
<!-- Custom Theme Scripts -->
<script src="${ctx }/public/js/custom.min.js"></script>
<!-- NProgress -->
<script src="${ctx }/public/nprogress/nprogress.js"></script>
<!-- bootstrap-daterangepicker -->
<script src="${ctx }/public/moment/min/moment.min.js"></script>
<script src="${ctx }/public/bootstrap-daterangepicker/daterangepicker.js"></script>
<script src="${ctx }/public/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script src="${ctx }/public/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
<script type="text/javascript" src="${ctx }/public/js/dic.js"></script>
<script type="text/javascript">
function save(){
	if($('#title').val()==''||$('#title').val()==null){
		alert('请选择输入标题！');
		return;
	}
	if($('#content').val()==''||$('#content').val()==null){
		alert('请选择输入标题！');
		return;
	}
	$('#form1').submit();
}
</script>
</html>